using System;
using System.Collections.Generic;
using System.Text;
using Objects;

namespace DAL
{
    public class DALThongTinGiaoTheTaiNha
    {
        public List<ThongTinGiaoTheTaiNha> GetAllItem(int idKhachHang, DateTime NgayDangKy)
        {
            List<ThongTinGiaoTheTaiNha> ListDanhSachKhachHang = new List<ThongTinGiaoTheTaiNha>();

            clsDataAccess acc = new clsDataAccess();

            string[] sname = new string[] { "@idKhachHang","@NgayDangKy"};
            string[] vname = new string[] {idKhachHang.ToString(),NgayDangKy.ToString() };
            System.Data.DataSet ds = acc.CommandSelect("ThongTinGiaoTheTaiNha_GetAllItem", sname, vname);

            ThongTinGiaoTheTaiNha Item = new ThongTinGiaoTheTaiNha();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                System.Data.DataRow dr = ds.Tables[0].Rows[i];
                ListDanhSachKhachHang.Add((Item.Populate(dr)));
            }
            return ListDanhSachKhachHang;
        }
    }
}
